<!--
//
// Linker.vue
// hs-admin
//
// Created by 区区电脑 on 2024/01/04.
//
-->
<template>
    <div class="Linker" :style="{height: containerHeight + 'px'}">
        <iframe v-if="link" :src="link" class="iframe"/>
    </div>
</template>

<script setup>
import {ref, reactive, computed, onMounted} from "vue";
import {useStore} from "vuex";
import {useRouter, useRoute} from "vue-router";

const props = defineProps({});
const emits = defineEmits();

// 路由
const router = useRouter();
const route = useRoute();
// store
const store = useStore();

const containerHeight = computed(() => store.getters.containerHeight)
const query = computed(() => route.query)
const link = ref()


onMounted(() => {
    console.log("Linker onMounted");
    link.value = query.value.link
})
</script>

<style scoped lang="scss">
.Linker {
    width: 100%;
    .iframe {
        width: 100%;
        height: 100%;
        border: none;
    }
}
</style>
